package by.euanpa.android.grodnobusstop.utils;

import android.location.Location;

public class LocationUtils {

	private static final String STUB_PROVIDER = "stub";

	public static float getDistance(Location fromLocation, int toLongitude, int toLatitude){
		Location toLocation = generateLocation(toLongitude, toLatitude);
		return fromLocation.distanceTo(toLocation);
	}
	
	public static Location generateLocation(int longitude, int latitude){
		Location location = new Location(STUB_PROVIDER);
		location.setLatitude(latitude);
		location.setLongitude(longitude);
		return location;
	}
	
}
